#pragma once
#include "..\..\std_lib_facilities.h"

class Money
{
public:
	Money();
	Money(long, string cr = "USD");
	Money(int, int, string cr = "USD");

	int dollars() const;
	int cents()	  const;
	long get_value() const;

	void set_value(long);


private:
	long units;
	string curr;
};


ostream& operator << (ostream& ostr, const Money& m);
istream& operator >> (istream& istr, Money& m);


Money operator + (const Money&, const Money&);
Money operator - (const Money&, const Money&);
Money operator * (const Money&, double);
Money operator / (const Money&, double);